<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>登录页面</title>
    <link rel="stylesheet" href="../resources/bootstrap-4.3.1-dist/css/public.css">
    <link rel="stylesheet" href="../resources/bootstrap-4.3.1-dist/css/login.css">
    <script src="../resources/jquery/jquery-3.4.1.min.js"></script>
    <script src="../resources/bootstrap-4.3.1-dist/js/bootstrap.js"></script>
    <script type="text/javascript">
        function login() {
            var username = $("#username").val();
            var password = $("#password").val();
            var dat = {
                "username":username,
                "password":password
            };
            $.ajax({
                type:'post',
                url:"/seckillUser/login",
                data: dat,
                success:function(data){
                    //跳转商品列表
                    location.href="stockListPage.html";
                },error:function(){
                    alert("请求出错，请稍后重试");
                }
            });
        }
    </script>
</head>
<body>
<div class="box">
    <div class="dly">
        <div class="dly_left" style="background-image: url('../resources/img/dengluye.png')"></div>

        <div class="dly_right">
            <p class="tit">登陆验证</p>
            <div class="zc_username">
                <span class="zc_tit">用户名</span>
                <input type="text" id="username" name="uname" class="username" />
                <!-- for="email"-->
            </div>
            <div class="zc_password">
                <span class="zc_tit">密&nbsp;&nbsp;&nbsp;码</span>
                <input type="password" id="password" name="upassword" class="pass_word" />
                <!-- for="email"-->
                <label class="error" id="pass_word_error"></label>
            </div>
            <!--                <input id="btn-ty" class="btn-ty" type="submit" value="登录">-->
            <button id="btn-ty" class="btn-ty" onclick="login();">登录</button>

<!--            <p class="cstyle">没有账号？<a href='http://localhost:8893/admin/toregister'>立即注册</a></p>-->
        </div>
    </div>
</div>
</body>

</html>